home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dspgroup / m56000_2.arc / SINTAB.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-02-25  |  566 b   |  33 lines

  1. ;
  2. ;    sintab    -    macro to generate twiddle factor lookup tables for
  3. ;            Decimation in Time FFT
  4. ;
  5. ;    cosine value in X memory
  6. ;    -sine value in Y memory
  7. ;
  8. ;    points    -    number of points (4 - 32768, power of 2)
  9. ;    twiddle    -    start of sine/cosine table
  10. ;
  11.  
  12. sintab    macro    points,twiddle
  13.  
  14. PI    equ    3.141592654
  15. ENT    equ    points/2
  16. FREQ    equ    PI/@cvf(ENT)
  17.  
  18.     org    x:twiddle
  19. count    set    0
  20.     dup    ENT
  21.     dc    @cos(@cvf(count)*FREQ)
  22. count    set    count+1
  23.     endm
  24.  
  25.     org    y:twiddle
  26. count    set    0
  27.     dup    ENT
  28.     dc    -@sin(@cvf(count)*FREQ)
  29. count    set    count+1
  30.     endm
  31.  
  32.     endm    ;end of macro sintab
  33.